package com.cyt.sys.service;

import com.cyt.base.model.dto.ReturnResult;
import com.cyt.sys.model.vo.SysDictVo;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @author yu sheng qiang
 * @create 2017-04-15 9:39
 **/
public interface BaseService<T> {

    public T selectByPrimaryKey(Object key);

    /** 根据指定进行查询 */
    public List<T> select(T t);

    /** 获取所有 */
    public List<T> selectAll();

    public int delete(T t);

    public int deleteByPrimaryKey(Object key);

    public int deleteByIds(String ids);

    public int insert(T t);

    public T selectOne(T t);

    public int updateByPrimaryKey(T t);

    public int updateByPrimaryKeySelective(T t);

    public int selectCount(T t);

    /** 分页查询 */
    public PageInfo listForPage(T t, int pageNum, int pageSize);

    /** 根据多主键查询 */
    public List<T> selectByIds(Class<T> clazz, String property, List<Object> values);

    /* 查询字典内容*/
    public ReturnResult queryDictInfo(SysDictVo sysDictVo);
}
